<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link href="../bootstrap-3.3.7-dist/css/bootstrap.css" rel="stylesheet">
		<style type="text/css">
			html,
			body,
			.container {
				height: 100%;
			}

			form {
				width: 400px;
				position: relative;
				top: 50%;
				left: 50%;
				transform: translate(-50%, -70%);
			}
		</style>
	</head>
	<body>
		<div id="app" class="container">
			<form class="text-center">
				<h1>欢迎使用XXX系统</h1>
				<div class="form-group">
					<input type="text" v-model="loginForm.account" class="form-control" id="ipt_account" placeholder="账号">
				</div>
				<div class="form-group">
					<input type="password" v-model="loginForm.password" class="form-control" id="ipt_password" placeholder="密码">
				</div>
				<div class="form-group">
					<div class="radio">
					  <label>
					    <input type="radio" v-model="loginForm.type" value="1" name="optionsRadios" id="optionsRadios1" value="option1" checked>
					    系统管理员
					  </label>
					  <label>
					    <input type="radio" v-model="loginForm.type" value="2" name="optionsRadios" id="optionsRadios2" value="option2">
					    宿舍管理员
					  </label>
					  <label>
					    <input type="radio" v-model="loginForm.type" value="3" name="optionsRadios" id="optionsRadios3" value="option3">
					    学生
					  </label>
					</div>
				</div>
				<div class="checkbox">
					<label>
						<input type="checkbox" v-model="loginForm.rems" value="a" id="cb_rem"> 记住密码
					</label>
					<label>
						<input type="checkbox" v-model="loginForm.rems" value="b"> 记住密码
					</label>
				</div>
				<div class="form-group">
					<button type="button" id="btn_login" @click="login()" data-loading-text="正在登录..." class="btn btn-primary btn-block">登录</button>
				</div>

				<div>
					<button style="width: 49%;" class="btn btn-default" type="button">注册</button>
					<button id="btn_forget" type="button" style="width: 49%;" class="btn btn-default">忘记密码</button>
				</div>
			</form>
		</div>

		<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
		<script src="../js/jquery-3.5.1.js"></script>
		<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
		<script src="../bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
		<script src="https://cdnjs.cloudflare.com/ajax/libs/bootbox.js/5.4.0/bootbox.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			// $('#btn_login').on('click', function() {
			// 	var $btn = $(this).button('loading');
			// 	setInterval(function() {
			// 		$btn.button('reset');
			// 		location.href = "index.html";
			// 	}, 1000);
			// 	// business logic...
			// 	// $btn.button('reset')
			// })
			// $('#btn_forget').on('click', function() {
			// 	bootbox.alert("Hello world!", function() {
			// 		console.log("Alert Callback");
			// 	});
			// })
		</script>
		<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			let app = new Vue({
				el: "#app",
				data: {
					loginForm: {
						account: "",
						password: "",
						type: 2,
						rem: false,
						rems: []
					}
				},
				methods: {
					login() {
						console.log(this.loginForm);
					}
				}
			})
		</script>
	</body>
</html>
